import request from "../../../utils/request"

export const getHistory = () => {
	return request.get(
		"moment/viewRecords?access_token=391fefd2-61e7-464f-a298-752809236444&pageSize=10"
	)
}

// 设置假toten
const token = "bc5fee72-4bb4-4fe7-8dc0-857b171201eb"

// 枚举
enum API {
	// 练习室历史数据
	ROOMLIST = "/trainingCenter/plans/search/findByUserId",
}
// /trainingCenter/plans/search/findByUserId?access_token=0537370c-6b52-41b3-8bfd-0d03f25876de&pageSize=20&pageNum=0&type=system
export const reqRoomList = () =>
	request.get(
		`trainingCenter/plans/search/findByUserId?access_token=391fefd2-61e7-464f-a298-752809236444&pageSize=20&pageNum=0&type=system`
	)

// https://www.dance365.com/apis/trainingCenter/planContents/search/findByPlanId?access_token=0537370c-6b52-41b3-8bfd-0d03f25876de&pageSize=20&pageNum=0&planId=ff80808182ed75b201831bcd778b21a5
export const reqroomItem = (planId: number) =>
	request.get(
		`/trainingCenter/planContents/search/findByPlanId?access_token=${token}&pageSize=20&pageNum=0&planId=${planId}`
	)

// 点击我创建的按钮
export const reqfound = () =>
	request.get(
		`/trainingCenter/plans/search/findByUserId?myListCategory=my_create&access_token=${token}&pageSize=20&pageNum=0&type=system`
	)

// 点击我加入的
export const reqmyAdd = () =>
	request.get(
		`/trainingCenter/plans/search/findByUserId?myListCategory=my_join&access_token=${token}&pageSize=20&pageNum=0&type=system`
	)

// 点击我课程的·
export const reqMyclass = () =>
	request.get(
		`/trainingCenter/plans/search/findByUserId?myListCategory=my_course&access_token=${token}&pageSize=20&pageNum=0&type=system`
	)

// 左边历史按钮
export const reqhistoryList = () =>
	request.get(`/moment/viewRecords?access_token=${token}&pageSize=10`)
